package com.knowledge.graph.controller;

import com.knowledge.graph.model.vo.ResponseVO;
import com.knowledge.graph.service.SearchService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;

@RestController
public class SearchController {

    @Resource
    private SearchService searchService;

    @GetMapping("/student/search")
    public ResponseVO doSearch(@RequestParam("text") String text) throws IOException {
        return searchService.dosearch(text);
    }

}
